/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.ucb.game8numbers.enums;

/**
 *
 * @author JessicaLuanne
 */
public enum EnumValues {
    UM("1", 1),
    DOIS("2", 2),
    TRES("3",3),
    QUATRO("4", 4),
    CINCO("5", 5),
    SEIS("6",6),
    SETE("7", 7),
    OITO("8", 8),
    VAZIO("",0);

    public static Integer getValueByText(String text) {
        for (EnumValues ev : values()) {
            if(ev.getText().equals(text))
                return ev.getValue();
        }
        return null;
    }

    private String text;
    private Integer value;

    private EnumValues(String text, Integer value) {
        this.text = text;
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

}
